{% extends 'admin/base/base.html' %}


{% block title %}
  课程管理页
{% endblock %}

{% block content_header %}
  课程管理
{% endblock %}

{% block header_option_desc %}
  课程管理
{% endblock %}


{% block content %}
  <div class="row">
    <div class="col-md-12 col-xs-12 col-sm-12">
      <div class="box box-primary">
        <div class="box-body">
          <table class="table table-bordered table-hover">
            <thead>
            <tr>
              <th>课程标题</th>
              <th>课程类别</th>
              <th>讲师名</th>
              <th>操作</th>
            </tr>
            </thead>
            <tbody id="tbody">
            {% for one_course in courses %}
              <tr data-id="{{ one_course.id }}" data-name="{{ one_course.title }}">
                <td>{{ one_course.title }}</td>
                <td>{{ one_course.category.name }}</td>
                <td>{{ one_course.teacher.name }}</td>
                <td>
                  <a href="{% url 'admin:courses_edit' one_course.id %}" class="btn btn-xs btn-warning btn-edit">编辑</a>
                  <button class="btn btn-xs btn-danger btn-del">删除</button>
                </td>
              </tr>
            {% endfor %}


            </tbody>
          </table>
        </div>
      </div>
    </div>
  </div>
{% endblock %}

{% block script %}
  <script src="{% static 'js/admin/course/courses_manage.js' %}"></script>
{% endblock %}